//
//  SelfDataTool.h
//  JiaoX
//
//  Created by jiaoxiu－005 on 15/1/8.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JXBaseTool.h"
#import "LoginRes.h"
#import "UserInfo.h"
#import "OrderList.h"
#import "AddressDetailList.h"
#import "AddressDetail.h"
#import "MyPageInfo.h"
#import "ProductSearch.h"
#import "RemndAppList.h"
#import "VoucherList.h"
#import "ShareProductRes.h"
#import "Voucher.h"
#import "CheckVoucherRes.h"


@interface SelfDataTool :JXBaseTool
/**
 *  登录
 */
+ (void)loginDataInfoWithParam:(NSDictionary *)param success:(void (^)(LoginRes *result))success failure:(void (^)(NSError *error))failure;
/**
 *  获取用户信息
 */
+(void)getUserInfoWithUserId:(NSString *)userId success:(void (^)(UserInfo *))success failure:(void (^)(NSError *))failure;
/**
 *  发送验证码
 */
+ (void)sendCodeWithParam:(NSDictionary *)param success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  重设密码
 *
 */
+ (void)resetPwdWithParam:(NSDictionary *)param success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  注册
 */
+ (void)registWithParam:(NSDictionary *)param success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取订单列表
 *
 *  @param type    订单type，1(有效)，2(成功)，-1(无效)
 *  @param success
 *  @param failure 
 */
+ (void)getOrderListWithOrderType:(NSString *)type success:(void (^)(OrderList *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取地址列表
 */
+ (void)getAddressListSuccess:(void (^)(AddressDetailList *result))success failure:(void (^)(NSError *error))failure;

/**
 *  删除地址
 *
 *  @param adresId 地址id
 *  @param success
 *  @param failure
 */
+ (void)deleteAddressWithID:(NSString *)adresId success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  新增地址或者修改地址
 *
 *  @param addressee   收件人姓名
 *  @param phoneCode   电话
 *  @param provinceId  省id
 *  @param cityId      市id
 *  @param areaId      县id
 *  @param detailAdres 详细地址
 *  @param addressId   如果为空，则是新增地址
 */
+ (void)addAddressWithAddressee:(NSString *)addressee phoneCode:(NSString *)phoneCode provinceId:(NSString *)provinceId cityId:(NSString *)cityId areaId:(NSString *)areaId detailAdres:(NSString *)detailAdres addressId:(NSString *)addressId success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取订单详情里面的地址
 *
 *  @param orderCode 订单号
 */
+(void)getOrderDetailAddress:(NSString *)orderCode success:(void (^)(AddressDetail *result))success failure:(void (^)(NSError *error))failure;

/**
 *  取消订单
 *
 *  @param orderCode 订单号
 */
+(void)cancelOrder:(NSString *)orderCode success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  提交反馈
 *
 *  @param content 反馈内容
 *  @param contact 联系方式
 */
+(void)commitFeedback:(NSString *)content contact:(NSString *)contact success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取我界面的信息
 */
+(void)getUserOtherInfo:(void (^)(MyPageInfo *result))success failure:(void (^)(NSError *error))failure;
/**
 *  获取我的收藏列表页面
 */
+(void)getCollectList:(void (^)(ProductSearch *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取推荐列表
 */
+(void)getRecommendAppList:(void (^)(RemndAppList *result))success failure:(void (^)(NSError *error))failure;

/**
 *  修改个人信息
 *
 *  @param userName   用户名
 *  @param userGender 用户性别
 *  @param uesrImage  用户头像
 *  @param success
 *  @param failure
 */
+(void)setUserInfo:(NSString *)userName userGender:(NSString *)userGender userImage:(UIImage *)uesrImage success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  登录第三方
 *
 */
+(void)oauthLoginWithParam:(NSDictionary *)param success:(void (^)(LoginRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  现金券
 */
+(void)getVolumeList:(NSDictionary *)param success:(void (^)(VoucherList *result))success failure:(void (^)(NSError *error))failure;

/**
 *  晒单列表
 */
+(void)getShareOrderList:(NSDictionary *)param success:(void (^)(ShareProductRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  校验代金券
 */
+(void)validateVoucher:(NSDictionary *)param success:(void (^)(CheckVoucherRes *result))success failure:(void (^)(NSError *error))failure;

@end
